<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

use DB;

class GoodsController extends Controller
{
    public function goodsDetail($id)
    {
        $data = DB::table('goods') -> where('id',$id) -> first();

        $data -> color = explode(",",$data -> color);
        $data -> system = explode(",",$data -> system);
        $data -> rom = explode(",",$data -> rom);
        $data -> combo = explode(",",$data -> combo);
        return view('/home/goods/goodsDetail',['data' => $data]);
    }
}
